/*
 * MusicLabs, Copyright (C) 2008-2009 Felippe Ragghianti
 * http://code.google.com/p/musiclabs
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

package br.com.music.harmony;

import br.com.music.Pitch;
import java.util.ArrayList;
import java.util.List;

import br.com.music.scale.DiatonicScale;

/**
 * This class represents a chord that is a set of notes played at the same time(concomitantly).
 * They are the horizontal part of a music(melody is the vertical part).
 * @author felippe.ferreira
 *
 */
public class Chord {
	
	private Pitch root;
	
	private List<Pitch> notes;
	
	public Chord(Pitch root)
	{
		super();
		this.root = root;
		DiatonicScale diatonicScale = new DiatonicScale(root);
		notes = new ArrayList<Pitch>();
		notes.add(diatonicScale.getNote(0));
		notes.add(diatonicScale.getNote(2));
		notes.add(diatonicScale.getNote(4));
	}
	
	public Pitch getRoot() {
		return root;
	}

	public List<Pitch> getNotes() {
		return notes;
	}
	
}
